//
//  LeftViewController.m
//  电影er
//
//  Created by dllo on 16/6/25.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "LeftViewController.h"
#import "AvtivityController.h"
#import "MyViewController.h"
@interface LeftViewController ()

@end

@implementation LeftViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self denglu];
}

-(void)denglu{
    UILabel *zhanghao = [[UILabel alloc]initWithFrame:CGRectMake(100, 200, 100, 50)];
    zhanghao.text = @"账号";
    [self.view addSubview:zhanghao];
    [zhanghao release];
    
    UILabel *mima = [[UILabel  alloc]initWithFrame:CGRectMake(100, 280, 100, 50)];
    mima.text = @"密码";
    [self.view addSubview:mima];
    [mima release];
    
    UITextField *zhang = [[UITextField alloc]initWithFrame:CGRectMake(150, 200, 100, 50)];
    zhang.placeholder =@"请输入账号";
    [self.view addSubview:zhang];
    [zhang release];
    
    UITextField *mi = [[UITextField alloc]initWithFrame:CGRectMake(150, 280, 100, 50)];
    mi.placeholder = @"请输入密码";
    [self.view addSubview:mi];
    [mi release];
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
    [button setTitle:@"登录" forState:UIControlStateNormal];
    button.frame = CGRectMake(100, 350, 80, 50);
    button.backgroundColor = [UIColor redColor];
    [self.view addSubview:button];
    [button release];
    UIButton *button1 = [UIButton buttonWithType:UIButtonTypeSystem];
    [button1 setTitle:@"注册" forState:UIControlStateNormal];
    button1.frame = CGRectMake(190, 350, 80, 50);
    button1.backgroundColor = [UIColor yellowColor];
    
    [self.view addSubview:button1];
    [button1 release];
    [button addTarget:self action:@selector(zhuAction:) forControlEvents:UIControlEventTouchUpInside];
     [button1 addTarget:self action:@selector(dengAction:) forControlEvents:UIControlEventTouchUpInside];
    
    
}
-(void)zhuAction:(UIButton*)button{
    AvtivityController *avc= [[AvtivityController alloc]init];
    [self.navigationController pushViewController:avc animated:YES];
    [avc release];
    
    
}
-(void)dengAction:(UIButton*)button{
    MyViewController *mvc=[[MyViewController alloc]init];
    [self.navigationController pushViewController:mvc animated:YES];
    [mvc release];
}










@end
